//模拟实现strncpy
#pragma warning(disable:4996)
#include<stdio.h>
#include<assert.h>
char* My_Strncpy(char* des, const char* str, size_t count)
{
	assert(des && str);
	char* ret = des;
	while (*des++ = *str++)
		count--;
	if (count)
		while (--count)
			*des++ = '\0';
	return ret;
}
int main()
{
	size_t count;
	scanf("%d", &count);
	char des[50] = "abcdf";
	char str[] = "wwwww";
	My_Strncpy(des, str, count);
	printf("%s\n", des);
	return 0;
}
